package com.dmz.wxcp.wecom.wxbusiness.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dmz.wxcp.vo.req.ProductReqVO;
import com.dmz.wxcp.wecom.wxbusiness.entity.Article;
import com.dmz.wxcp.wecom.wxbusiness.entity.ProductCategory;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ProductMapper extends BaseMapper<Article> {

    List<Object> getProductList(@Param("vo") ProductReqVO vo);


    @Select("select distinct category_id,category_name from product_category "+
            "where level=3")
    List<ProductCategory> getProductCategorys();

    @Select("select distinct tags from article where category_id=6")
    List<String> selectTags();
}
